package com.trade.wzj.common.yu;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.junit.Test;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
//import com.trade.wzj.service.yu;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import com.trade.wzj.service.yu.ClientInfoServiceImpl;
import com.trade.wzj.service.yu.IClientInfoService;

@Controller
@RequestMapping("/testYu")
public class YuController {
	@RequestMapping("/index")
	public String index() {
		System.out.println(dao.getClass());
		return "testDel";
	}
	
	@RequestMapping("/test")
	@ResponseBody
	public boolean clientInfoisDel(Integer clientInfoId,Model mod){	
		boolean date = true;
		try {
			date = dao.clientInfoisDel(clientInfoId);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return date;
	}
	
	@RequestMapping("/supplierInfoDel")
	@ResponseBody
	@Test
	public boolean supplierInfoDel(Integer supplierInfoId,HttpServletResponse response){
		boolean date = true;
		try {
			date = dao.supplierInfoisDel(supplierInfoId);
			Integer i=new Integer('A');
			Integer a=new Integer("0x12");
			System.out.println(i+"++"+a);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return date;
	}
	
	
	@Resource(name="tt")
	public IClientInfoService dao;
	
	public IClientInfoService getDao() {
		return dao;
	}

	public void setDao(IClientInfoService dao) {
		this.dao = dao;
	}
}
